'''
插入排序
'''
def insert_sort(list):
    for i in range(1, len(list)):
        for j in range(i, 0, -1):
            if list[j] < list[j - 1]:
                list[j], list[j - 1] = list[j - 1], list[j]
            else:
                break
    print(list)

if __name__ == '__main__':
    insert_sort([29, 24, 25])
    # bubble_sort([22, 24, 25])
